<?php 
include TMPL_PATH.'public/header.phtml';
?>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
        <div style="float:left;margin-right:50px;">
        <a href='javascript:;' class="on"><em>媒体列表</em></a> <span>|</span> <a href="<?php echo U('article/mediareports_add')?>"><em>添加系列</em></a>
         </div>

    	<div style="color:#000;">
    		<form name="searchform" action="__SELF__"  method="post">
    		<input type="hidden" value="1" name="search">
                  链接:
				<input type="text" class="input-text" value="<?php echo $keyword;?>" name="keyword" size="50">
	    分类：<select name="media_type">
	    <option value="0">选择分类</option>
	            <?php foreach (C('miedia_type') as $key=>$v):?>
				<option value="<?php echo $key?>" <?php if($media_type==$key)echo'selected';?>><?php echo $v;?></option>
				<?php endforeach;?>
	     </select>
				<input type="submit" value="搜索" class="button" name="search">
    		</form>
    	</div> 
    </div>         
</div>
<form name="myform" action="<?php echo U('Article/MediaListOrder', 'vid='.$vid); ?>" method="post">
<div class="pad_10">
<div class="table-list">
    <table width="100%" cellspacing="0">
    <thead>
        <tr>
            <td align="center" width="5%;" >排序</td>
			<td align="center" width="10%;">分类</td>
            <td align="left" width="45%">内容</td>
            <td align="left" width="10%">内容链接</td>
            <td align="center" width="10%">媒体图片</td>
            <td align="left" width="15%">图片链接</td>
            <td align="center" width="5%">编辑</td>
        </tr>
    </thead> 
    <tbody>        
    <?php foreach($mediaList as $k=>$v):?>
        <tr>
            <td align="center" style="color:#2e8b57;" >
			<input id="listorder-<?php echo $v['id']?>" name='listorders[<?php echo $v['id']?>]' type='text' size='3' title="当光标离开输入框后修改排序" value='<?php echo $v['listorder']?>' onblur="javascript:setting_listorder(<?php echo $v['id']?>);" class='input-text-c'>	
			<td align="center" style="color:red;"><?php if($v['media_type']==1){echo "Media-Mentions";}elseif($v['media_type']==2){echo "Bloggers-Say";}elseif($v['media_type']==3){echo "Customer-Reviews";}elseif($v['media_type']==4){echo "Guest-Posts";}?></td>
            <td align="left" >
            <div style='width: 100%;display:block;word-break: break-all;word-wrap: break-word;'> 
            <?php echo str_replace("\n","<br>",$v['content'])?>
            </div>
            </td>
            <td align="left"><?php echo $v['path_alias2']?></td>
            <td align="center"><img src="<?php echo $v['media_img'] ?>" width="100" /></td>
            <td align="left"><?php echo $v['path_alias']?></td>
            <td align="center"><a href="<?php echo U('article/mediareports_edit', 'aid='.$v['id']);?>" title=" <?php echo $v['id'];?>">修改</a> |  <a href='<?php echo U('article/mediareports_delete', 'aid='. $v['id']);?>'    onClick="return confirm('确认要删除 『 <?php echo $v['id'];?> 』 吗？')">删除</a></td>
        </tr>
    <?php endforeach;?>
    </table>
    <div class="btn">
     <input type="hidden" name="vid" value="<?php echo $vid?>" />
	<input type="submit" class="button" name="dosubmit" value="排序" />
	</div> 
</tbody>
<div id="pages"><?php echo $pageShow;?></div>
</div>
</div>
</body>
</html>
